package com.factory;

import java.util.Scanner;



public class EnemyShipTesting {
	public EnemyShipTesting(){
		EnemyShip enemyShip = null;
		
		EnemyShipFactory enemyShipFactory = new EnemyShipFactory();
		
		Scanner userInput = new Scanner(System.in);
		String enemyShipOption = "";
		
		System.out.print("What type of ship? (U / R/ B)");
		
		if(userInput.hasNextLine()){
		enemyShipOption = userInput.nextLine();
		
		enemyShip = enemyShipFactory.makeEnemyShip(enemyShipOption);
		}
		
		/*
		Scanner userInput = new Scanner(System.in);
		String enemyShipOption = "";
		
		System.out.print("What type of ship? (U / R)");
		
		if(userInput.hasNextLine()){
			enemyShipOption = userInput.nextLine();
		}
		
		if(enemyShipOption.equals("U")){
			enemyShip = new UFOEnemyShip();
		}else{
			if(enemyShipOption.equals("R")){
				enemyShip = new RocketEnemyShip();
			}
		}
		*/
		
		doStuffEnemy(enemyShip);
	}
	
	public void doStuffEnemy(EnemyShip anEnemyShip){
		anEnemyShip.displayEnemyShip();
		anEnemyShip.fallowHeroShip();
		anEnemyShip.enemyShipShoots();
	}
}
